# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>

pkgname=xortool
pkgver=0.99
pkgrel=5
pkgdesc='Tool to analyze multi-byte XOR cipher'
url='https://github.com/hellman/xortool'
arch=('any')
license=('MIT')
depends=('python' 'python-docopt')
makedepends=('python-setuptools' 'python-wheel')
source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('e7d356b65f57408706c614982892e2b2d3c9465b37e82bd81d17fe33e88e62d8260b83e34a7e11eb98f94c7c9cdff3530c8d844f409c5d7c28d5909ca099235a')
b2sums=('a183533c2c6e03dd4f74f6af69c1cfd01c327e0dd9244ac414022da270ae1659974a7462af42b8cd181266469da3e55aea8a2619d8172abb0a5b7756b5d0aac2')

build() {
  cd ${pkgname}-${pkgver}
  python setup.py build
}

check() {
  cd ${pkgname}-${pkgver}
  export LANG=en_US.UTF-8
  export LC_CTYPE=en_US.UTF-8
  PYTHONPATH=.  ./test/test.sh dist
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install -O1 --root="${pkgdir}" --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
